# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=py3-sphinxcontrib-websupport
_pkgname=sphinxcontrib-websupport
pkgver=1.2.4
pkgrel=7
pkgdesc="Sphinx API for Web Apps"
url="https://pypi.org/project/sphinxcontrib-websupport"
arch="noarch"
license="BSD-2-Clause"
depends="python3 py3-jinja2 py3-docutils py3-sphinx"
makedepends="python3-dev py3-setuptools py3-wheel py3-gpep517"
checkdepends="py3-sphinxcontrib-serializinghtml py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	remove-six.patch
	"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages test-env
	test-env/bin/python3 -m installer .dist/*.whl
	test-env/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
d1ccfb6a9ecfa6adbdf2298f4ded345cacefbc5a450b8dafc6faadbcd0dd79a8dbefcab4d1cedf34c65fc271aab754392bea8ab8ae82852323784a9e1717914c  sphinxcontrib-websupport-1.2.4.tar.gz
675cea49f1ae25d250e84d95808fbd5e551f469b1d1be73400971eab8a43e28acd8675d01493d452c9a7b794ad7c1f77e8e46338c2bdf4ec297976056f4f3367  remove-six.patch
"
